// newmodels/repairProgressSchema.js
const mongoose = require('mongoose');

//维修进度表
const repairProgressSchema = new mongoose.Schema({
  machineId: { type: mongoose.Schema.Types.ObjectId, ref: 'Machine', required: true }, // 维修表的ID
  userId: { type: mongoose.Schema.Types.ObjectId, ref: 'users', required: true }, // 用户表的ID   
  repairInfo: { type: String, required: true }, // 维修处理信息
  createdAt: { type: Date, default: Date.now }, // 创建时间，默认为当前时间
  updatedAt: { type: Date, default: Date.now } // 修改的时间，默认为当前时间
});

module.exports = mongoose.model('RepairProgress', repairProgressSchema);